# Contributor: tcely <sequoia-sqv+aports@tcely.33mail.com>
# Maintainer: Simon Rupf <simon@rupf.net>
pkgname=sequoia-sqv
pkgver=1.1.0
pkgrel=5
pkgdesc="simple signature verification program"
url="https://sequoia-pgp.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	cargo
	cargo-auditable
	clang-dev
	nettle-dev
	"
source="
	https://gitlab.com/sequoia-pgp/sequoia-sqv/-/archive/v$pkgver/sequoia-sqv-v$pkgver.tar.gz
	cargo-update-sha1collisiondetection.patch
	"
builddir="$srcdir/sequoia-sqv-v$pkgver"

prepare() {
	default_prepare

	cargo update -p buffered-reader --precise 1.2.0
	cargo update -p sequoia-openpgp --precise 1.16.0
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/sqv -t "$pkgdir"/usr/bin
}

sha512sums="
8a39ba244fcca61635bd633ebbcd0aa102dcb8139984f3e6db9a5e011e7cbc47f4dad1d5606730ac66ec6dac42b1c372f2fd022d55c9a989a5ef6430922b8fb5  sequoia-sqv-v1.1.0.tar.gz
f0a590f4ba9ce934edfe6620bace5f46d77666fb0aeb93af5358f8a5ddb1db8967e17340536ed9e7eecc1a15ee09ea7acd8cab1f39e699a4ddc29d4ccef3b139  cargo-update-sha1collisiondetection.patch
"
